package com.wc.AlgoOJ_train.train1.c7.A715;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/11 13:08
 * @description 光头数
 * http://43.138.190.70:8888/p/A715
 */
public class Main {
    public static void main(String[] args) {
        long[] dp = new long[21];
        long[] p = new long[21];
        long pre = 1;
        p[1] = 1;
        dp[1] = 1;
        for (int i = 2; i <= 20; i++) {
            p[i] = p[i - 1] << 1;
            dp[i] = pre + p[i];
            pre += dp[i];
        }
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0){
            int n = sc.nextInt();
            System.out.println(dp[n]);
        }
    }
}
